Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Refactor about:preferences#payments followups #6047

Merged
merged 6 commits into from
Dec 15, 2016
Merged

Refactor about:preferences#payments followups #6047

merged 6 commits into from
Dec 15, 2016

Conversation

luixxiul
Copy link
Contributor

@luixxiul luixxiul commented Dec 6, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

This is a follow-up of #6009

This PR has 6 commits:

  1. Polishment of titleBar and walletBar
  2. Made the selectors specific on about:preferences#payments to avoid unexpected regressions
  3. Added margin-bottom of the transfer funds button (Redo Added margin-bottom to the transfer funds button on about:preferences#payments #6049)
  4. Fixed advanced settings modal dialogs on about:preferences#payments
  5. Polishment of modal dialog and advanced settings dialog on about:preferences#payments
  6. Restyled payment history table

Test plans are explained below.

1st commit

Polishment of titleBar and walletBar

On about:preferences#payments

  • Disabled underline of the anchor link of fundsFAQ (fixes Funds FAQ icon is underlined on hover #6083)
  • Set font-size of the elements to 14.5px
  • Set margin of the elements to 12px
  • Set min-width to the select, input, and button
  • Set padding, based on the margin of the items inside it

On about:preferences

screenshot 2016-12-10 14 31 04

Test Plan 1

  1. Open about:preferences
  2. Make sure the style of about:preferences looks consistent

2nd commit

Made the selectors specific on about:preferences#payments to avoid unexpected regressions

See the commit message for more details

Also .paymentHistoryFooter was introduced to fix #6061
screenshot 2016-12-10 14 41 44

Test Plan 2

  1. Make sure all of the selectors listed up in the commit message (except removed ones) can be actually found in the code, especially preferences.js
  2. Make sure the style of about:preferences#payments is not broken
    • Open about:preferences#payments
    • Toggle off/on switch
    • Click "Advanced Settings..."
    • Click "Backup your wallet" and "Done"
    • Click "Recover your wallet" and "Done"
    • Click "Add funds..."
    • Click "Display QR code"
  3. Make sure the verified icon is no longer clickable

3rd commit

Added margin-bottom of the transfer funds button (Redo #6049)
This fixes #6048

screenshot 2016-12-10 14 42 30

Test Plan 3

  1. Open https://jsfiddle.net/LnwtLckc/5/
  2. Click "register"
  3. Make sure "Transfer BTC" button has the margin-bottom on add funds dialog on about:preferences#payments

4th commit

This commit will be squashed with the 5th commit after review

Fixed advanced settings modal dialogs on about:preferences#payments

Added white-space:nowrap to recovery keys (fixes #6220)

Test Plan 4

(n/a; covered by Test Plan 5)

5th commit

Polishment of modal dialog and advanced settings dialog on about:preferences#payments

Mockup images by @bradleyrichter: #5719 (comment)

Restyled modal dialog under .paymentsContainer

screenshot 2016-12-15 3 32 43

For US
screenshot 2016-12-15 3 25 51

For non-US
screenshot 2016-12-15 3 23 27

Restyled advanced settings dialog

screenshot 2016-12-15 3 33 58

Test Plan 5

For "Restyled modal dialog under .paymentsContainer"

  1. Enable Coinbase if not
  2. Open about:preferences#payments
  3. Click "Add funds..."
  4. Make sure the board is well styled
  5. Make sure the footer is aligned horizontally
  6. Click "Fund with debit/credit"
  7. Make sure Coinbase widget is displayed with transparent background
  8. Open https://jsfiddle.net/LnwtLckc/5/
  9. Click "register" and go back
  10. Make sure "Transfer BTC" button is aligned to right

For "Restyled advanced settings dialog"

  1. Click "Advanced Settings..."
  2. Check the margin between the labels and the select forms
  3. Click "Backup your wallet"
  4. Check the margin between the labels and the keys
  5. Click "Done" and "Recover your wallet"
  6. Check the margin between the labels and the input forms

6th commit

Restyled payment history table

Closes #6202
Closes #3485

screenshot 2016-12-15 3 36 37

Test Plan:

  1. Disable the ledger
  2. run npm run add-simulated-payment-history some times
  3. Enable the ledger
  4. Click "View Payment History..."
  5. Click "OK" button

@luixxiul luixxiul added feature/rewards polish Nice to have — usually related to front-end/visual tasks. refactoring labels Dec 6, 2016
@@ -1134,17 +1144,6 @@ table.sortableTable {
}
}

span {
Copy link
Contributor Author

@luixxiul luixxiul Dec 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this is outside of .walletBar. The commit message of 6c168c7 will be fixed when squashing.

@bsclifton bsclifton added this to the 0.13.1 milestone Dec 6, 2016
@luixxiul
Copy link
Contributor Author

luixxiul commented Dec 6, 2016

#paymentHistory was replaced with .paymentHistoryTable (because .paymentHistory already exists).

padding-top: 10px;
padding-bottom: 10px;

.paymentHistoryFooter {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fix #6061

@bsclifton
Copy link
Member

@luixxiul if you want to squash it up, I'm finally checking it out now 😄

I'm not sure how many more UI changes we should pull in, so I'm leaving it as 0.13.1 for now... Will leave notes here after I get a chance to try it 😄

@bsclifton
Copy link
Member

Actually, with how bad #6061 looks, maybe this should be pulled in

Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of small changes; I tried it out and I really like it 😄 However, I was curious if you could summarize all of the changes in the original post of the PR. As a reviewer, I'm having a hard time knowing what to look for and I feel that I may make a mistake

@bsclifton
Copy link
Member

bsclifton commented Dec 9, 2016

For example, I see the title over the select boxes is very close, almost touching:
screen shot 2016-12-08 at 11 51 04 pm

Because of the problems we've had with our less being fragile (ex: the selectors not being specific enough), I'd have to try master and compare to know 100% if this changed or not

@luixxiul
Copy link
Contributor Author

luixxiul commented Dec 9, 2016

@bsclifton thanks, I've noticed it. Should I include the fix into this PR? It will be like this: https://github.com/luixxiul/browser-laptop/commit/2327e9eca53eb4a637dd4c3e3a2a1d1f613c2fbc#commitcomment-19937858

@luixxiul
Copy link
Contributor Author

luixxiul commented Dec 9, 2016

@bsclifton rather should I add comments on lines https://github.com/brave/browser-laptop/pull/6047/files (or in each commit) to clarify what I changed?

@bsclifton
Copy link
Member

bsclifton commented Dec 9, 2016

@luixxiul the change you made above, let's definitely include with this PR 👍

The screenshots are ok- it would help to have a quick summary like:

  • Payments > Advanced settings: moved up text above select fields (it was too close)
  • Recovery keys will no longer wrap around
  • etc

Actually- looking at your commit history, those messages are almost perfect 😄 The pictures are only useful (to me as a reviewer at least) if there is a before and after

@luixxiul
Copy link
Contributor Author

luixxiul commented Dec 10, 2016

@bsclifton Updated and squashed! I added the summary and the QA steps for each commit in the original post of this PR.

@luixxiul
Copy link
Contributor Author

Updated, removing input[type='range'] (as it exists in sortable.less)

@bsclifton
Copy link
Member

bsclifton commented Dec 15, 2016

Big ++ from me too! Really nice cleanup of the original post, BTW 😄

This was an intimidating pull request for sure- but the work is very much appreciated. Going forward, I don't think we'll ever have this many tweaks to the same pages again

Squash it up and then I'll give it one last test and can merge after that 😄
(edit: I am also wanting to make sure automated tests still look good)

Suguru Hirahara added 2 commits December 16, 2016 00:59
…erences#payments

Mockup images by @bradleyrichter: 5719#issuecomment-262431933

Restyled modal dialog under .paymentsContainer
- Made the background of modal dialog consistent (except .coinbaseOverlay)
- Changed border-radius of modal dialog in .paymentsContainer from 4px to 8px (fixes 6223)
- Fixed spacing of the modal dialog header (fixes 6221)
  - Set padding:25px to .sectionTitle in .dialog-header
- Set margin-top:0 to the first panel inside .board
- Set margin-bottom:0 to the last panel inside .board
- Aligned buttons in the footer with flex-end (fixes 6219)
- Introduced .addFundsBoard
  - Aligned fa icons on the payment panel with display:flex (fixes 6222)
  - Aligned "Transfer BTC button" with display:flex
- Fixed panelFooter in .addFundsBoard (fixes 5799)
  - Aligned Coinbase icon and message
  - Display the footer (closes 6007)

Restyled advanced settings dialog
- Designed "hide sites if" options on the dialog (closes 6201, which is a follow-up of 4681)
- Made the margin consistent between the headers/labels and the input/select element
  - Addresses 6047#issuecomment-265946727

Auditors: @bsclifton

Test Plan 1
1. Enable Coinbase if not
2. Open about:preferences#payments
3. Click "Add funds..."
4. Make sure the board is well styled
5. Make sure the footer is aligned horizontally
6. Click "Fund with debit/credit"
7. Make sure Coinbase widget is displayed with transparent background
8. Open https://jsfiddle.net/LnwtLckc/5/
9. Click "register" and go back
10. Make sure "Transfer BTC" button is aligned to right

Test Plan 2
1. Click "Advanced Settings..."
2. Check the margin between the labels and the select forms
3. Click "Backup your wallet"
4. Check the margin between the labels and the keys
5. Click "Done" and "Recover your wallet"
6. Check the margin between the labels and the input forms
Closes 6202
Closes 3485 /cc: @mrose17

- Removed "pull-right" class from the close button in modalOverlay.less (to confirm 21ece29 of 6009 fixed 5719)
- Added color:@braveMediumOrange to .sectionTitle of .paymentHistory (closes 6229)
- Added padding-left and padding-right to th and td (fixes 6231)
- Added white-space:nowrap to disable wrap (fixes 6230)
- Added min-width:80px to the button inside the footer (fixes 6232)
- Made sectionTitle consistent
  - Removed ":not(.paymentHistory)" from modalOverlay.less

Test Plan:
1. Disable the ledger
2. run "npm run add-simulated-payment-history" some times
3. Enable the ledger
4. Click "View Payment History..."
5. Click "OK" button
@bsclifton
Copy link
Member

Looks great, merging! 😄

@bsclifton bsclifton merged commit 8ef38d9 into brave:master Dec 15, 2016
luixxiul referenced this pull request Mar 25, 2017
Resolves #7501 #7380 #6364

Auditors: @bsclifton @cezaraugusto

Test plan:
- everything should work the same as was before the chage
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.